<template>
	<div>
		<el-form  :model="form" label-width="80px">
		  <el-form-item label="id">
		    <el-input v-model="form.id"></el-input>
		  </el-form-item>
		  
		  <el-form-item label="菜单名称">
		    <el-input v-model="form.menuName"></el-input>
		  </el-form-item>
		  
		  <el-form-item label="url">
		    <el-input v-model="form.url"></el-input>
		  </el-form-item>
		  
		  <el-form-item>
		    <el-button type="primary" @click="save()">保存</el-button>
		    <el-button @click="cancle">取消</el-button>
		  </el-form-item>
		</el-form>
		
		
	</div>
	
</template>

<script>
	export default{
		name:'UserEdit',
		props:['visible',"form"],
		data(){
			return{
				// form:{
				// 	id:'1',
				// 	menuName:'用户管理',
				// 	url:'/ums/user'
				// }
			}
		},
		methods:{
			cancle(){
				//修改属性 visible false
				this.$emit("update:visible",false)
			},
			save(){
				// this.form-->保存到数据库
				// 让列表页重新加载刷新
				
				
				//关掉自己
				this.$emit("update:visible",false)
				
			}
		}
	}
</script>

<style>
</style>